package com.group9.nepmserver.controller;

import com.group9.nepmserver.pojo.GridCity;
import com.group9.nepmserver.service.IGridCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/gridCity")
public class GridCityController {

    @Autowired
    private IGridCityService gridCityService;

    //根据省编号查询市信息接口
    @RequestMapping("/listGridCityByProvinceId")
    public List<GridCity> listGridCityByProvinceId(@RequestBody GridCity gridCity){
        return gridCityService.listGridCityByProvinceId(gridCity.getProvinceId());
    }

}
